package com.tongtailian.www.stir.base;

import android.androidlib.utils.rxutil.RxBus;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.tongtailian.www.stir.utils.SPManager;


/**
 * @author liuml
 * @explain
 * @time 2018/10/15 11:22
 */
public class BaseFragment extends Fragment {
    SPManager spManager;
    public RelativeLayout baseRelativeLayout;
    private RelativeLayout rlTitle;
    private TextView titleName;
    private LinearLayout llLeft;
    private TextView tvLeft;
    private ImageView ivLeft;
    private ImageView ivBottom;
    private LinearLayout llRight;
    private TextView tvLeftright;
    private TextView tvRight;
    private ImageView ivRight;
    private LinearLayout llUpdateclose;
    private ImageView ivUpdate;
    private ImageView ivClose;
    private ImageView imgShare;
    private RelativeLayout rlSearch;
    private TextView txtCancel;
    private RelativeLayout llSearch;

    public Activity activity;
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        spManager = SPManager.instance(getActivity());
        RxBus.get().register(this);

    }

    @Override
    public void onAttach(@NonNull Context context) {
        super.onAttach(context);
        activity = getActivity();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        RxBus.get().unRegister(this);
    }

    public void setTitle(String title) {
        titleName.setText(title);
    }


}
